import request from '@/utils/request'

export default {
  // 电子围栏树列表
   treeList:()=> {
    return request({
      url: '/location/fence/treeList',
      method: 'get'
    })
  },
  // 删除电子围栏
  delFence(fenceIds) {
    return request({
      url: '/location/fence/' + fenceIds,
      method: 'delete'
    })
  },
  //新增电子围栏
  addFence: (data) => request({
    url: '/location/fence',
    method: 'post',
    data: data
  }),
  // 修改电子围栏
  updateFence(data) {
    return request({
      url: '/location/fence',
      method: 'put',
      data: data
    })
  },
  // 获取电子围栏详细信息
  fenceDetail:(key)=> {
    return request({
      url: '/location/fence/'+key,
      method: 'get',
    })
  },
  // 查询围栏车辆绑定列表
  fenceCarList:(key)=> {
    return request({
      url: '/location/fence_car/listAll',
      method: 'get',
      params:key
    })
  },
  // 新增围栏车辆绑定
  addFenceBingding: (data) => request({
    url: '/location/fence_car',
    method: 'post',
    data: data
  }),
   // 获取组织树
   deptTree: () => {
    return request({
      url: '/location/gps/deptTree',
      method: 'get'
    })
  },
  // 获取类型树
  carTypeTree: () => {
    return request({
      url: '/location/fence/carTypeTreeList',
      method: 'get'
    })
  },
  //获取车辆树信息
  groupCarTree: (key) => {
    return request({
      url: '/location/gps/groupCarTree',
      method: 'get',
      params: key
    })
  },
   //查询围栏车辆绑定列表分页
   fenceCarPage: (key) => {
    return request({
      url: '/location/fence_car/list',
      method: 'get',
      params: key
    })
  },


}





